package com.wsx.ones.monitor.core.transport;

import com.wsx.ones.monitor.core.model.RpcRequest;
import com.wsx.ones.monitor.core.model.RpcResponse;

import java.net.InetSocketAddress;

/**
 * 执行接口的高层设计
 * Created by wangshuaixin on 17/2/4.
 */
public interface Channel {

    InetSocketAddress getLocalAddress();

    InetSocketAddress getRemoteAddress();

    RpcResponse request(RpcRequest rpcRequest) throws TransportException;

    boolean open();

    void close();

    boolean isClosed();
}
